
#ifndef WKPLAYER_WKQUEUE_H
#define WKPLAYER_WKQUEUE_H

#include <queue>
#include <pthread.h>
#include "PlayerStatus.h"

extern "C"
{
#include <libavcodec/avcodec.h>
};


class WkQueue {
public:
    std::queue<AVPacket *> queuePacket;
    pthread_mutex_t mutexPacket ;
    pthread_cond_t condPacket ;
    PlayerStatus * playerStatus =NULL ;


public:
    WkQueue(PlayerStatus *playerStatus);
    ~WkQueue();
    int putAvPacket(AVPacket* avPacket);
    int getAvPacket(AVPacket * avPacket);
    int getQueueSize();
    void clearAvPacket();

};

#endif //WKPLAYER_WKQUEUE_H
